import React, { lazy } from 'react'
import {
  HomeOutlined,
  FileTextOutlined,
  SearchOutlined,
  KeyOutlined,
  ReadOutlined,
  BarChartOutlined,
  TeamOutlined,
  UserOutlined,
  MenuOutlined,
} from '@ant-design/icons'
const menus = [
  {
    path: '/',
    key: '/',
    redirect: '/home',
    meta: {
      // 该路由不出现在左侧菜单栏
      hidden: true,
    },
  },
  {
    path: '/home',
    key: '0-0',
    title: '系统首页',
    icon: <HomeOutlined />,
    component: lazy(() => import('../views/home/Index')),
  },
  {
    path: '/theorytest',
    key: '0-1',
    title: '理论考试',
    icon: <FileTextOutlined />,
    redirect: '/theorytest/amount',
    children: [
      {
        path: '/theorytest/amount',
        key: '0-1-0',
        title: '试卷数量',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/theorytest/Amount')),
      },
      {
        path: '/theorytest/state',
        key: '0-1-1',
        title: '考试状态',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/theorytest/State')),
      },
      {
        path: '/theorytest/list',
        key: '0-1-2',
        title: '考试列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/theorytest/List')),
      },

      {
        path: '/theorytest/mytest',
        key: '0-1-3',
        title: '我的考试',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/theorytest/Mytest')),
      },
      {
        path: '/theorytest/testing',
        key: '0-1-4',
        title: '进行中考试',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/theorytest/Testing')),
      },
      {
        path: '/theorytest/endtest',
        key: '0-1-5',
        title: '已结束考试',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/theorytest/Endtest')),
      },
    ],
  },
  {
    path: '/testpapermanage',
    key: '0-2',
    title: '试卷管理',
    icon: <SearchOutlined />,
    redirect: '/testpapermanage/textquestionmanage',
    children: [
      {
        path: '/testpapermanage/textquestionmanage',
        key: '0-2-0',
        title: '试题管理',
        icon: <MenuOutlined />,
        component: lazy(() =>
          import('../views/testpapermanage/Textquestionmanage')
        ),
      },
      {
        path: '/testpapermanage/createpaper',
        key: '0-2-1',
        title: '我要出卷',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/testpapermanage/Createpaper')),
      },
      {
        path: '/testpapermanage/remove',
        key: '0-2-2',
        title: '删除试卷',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/testpapermanage/Remove')),
      },
      {
        path: '/testpapermanage/filter',
        key: '0-2-2',
        title: '筛选重复试卷',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/testpapermanage/Filter')),
      },
      {
        path: '/testpapermanage/list',
        key: '0-2-3',
        title: '试卷题库列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/testpapermanage/List')),
      },
    ],
  },
  {
    path: '/grademanage',
    key: '0-3',
    title: '成绩管理',
    icon: <KeyOutlined />,
    component: lazy(() => import('../views/grademanage/Index')),
  },
  {
    path: '/examineemanager',
    key: '0-4',
    title: '考生管理',
    icon: <ReadOutlined />,
    component: lazy(() => import('../views/examineemanager/Index')),
    children: [
      {
        path: '/examineemanager/add',
        key: '0-4-0',
        title: '添加考生',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/examineemanager/Add')),
      },
    ],
  },
  {
    path: '/userinfo',
    key: '0-5',
    title: '个人信息',
    icon: <BarChartOutlined />,
    component: lazy(() => import('../views/userinfo/Index')),
  },
  {
    path: '/scorerefer',
    key: '0-6',
    title: '成绩查询',
    icon: <TeamOutlined />,
    component: lazy(() => import('../views/scorerefer/Index')),
  },
  {
    path: '/infoentering',
    key: '0-7',
    title: '信息录入',
    icon: <UserOutlined />,
    component: lazy(() => import('../views/infoentering/Index')),
    children: [
      {
        path: '/infoenterinng/uploadstudentlist',
        key: '0-7-0',
        title: '学生信息录入',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/infoentering/student')),
      },
      {
        path: '/infoenterinng/uploadteacherlist',
        key: '0-7-1',
        title: '教师信息录入',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/infoentering/teacher')),
      },
    ],
  },

  // {
  //   path: '/setting',
  //   key: '0-8',
  //   title: '设置',
  //   icon: <MenuOutlined />,
  //   component: lazy(() => import('../views/setting/Index')),
  //   meta: { // 该路由不出现在左侧菜单栏
  //     hidden: true
  //   }
  // }
]

export default menus
